package com.wcar.frontsso.feign.factory;

import com.wcar.common.entity.FrontUser;

import com.wcar.common.vo.Result;
import com.wcar.frontsso.feign.FrontUserFeign;
import feign.hystrix.FallbackFactory;

public class UserFeignFactory implements FallbackFactory<FrontUserFeign> {
    @Override
    public FrontUserFeign create(Throwable throwable) {
        return new FrontUserFeign() {
            @Override
            public Result<FrontUser> fontSelectByName(String name) {
                return new Result<>(500,throwable.getMessage(),null);
            }
        };

    }
}
